<div class="SipeiInfo border_3 pt20 pb20 centered back_bgf">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
    'action' => Yii::app()->createUrl($this->route),
    'method' => 'POST',
    'id' => 'searchForm',
    'htmlOptions'=>array('target'=>'ajax-frame')));
    ?>
    <table class="fontc_666 height32">
        <tbody>
        <input type="hidden" value="<?php echo $date['id']; ?>" name="info[report_id]" />
        <tr height="55">
            <td valign="top" width="125" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>排序号：</td>
            <td valign="top" width="370" class="formValidator_td">
                <input type="text"  name="info[number]" id='number' value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                <div class="formValidator_tip">
                    <p id="numberTip" ></p>
                </div>

            </td>
        </tr>
        <tr height="55">
            <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>字段名称：</td>
            <td valign="top" class="formValidator_td">
                <input type="text" value="" name="info[name]" id='name'  class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                <div class="formValidator_tip">
                    <p id="nameTip" ></p>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right" class="pb20 pr5"><span class="pr5 fontc_orange_red">*</span>数据类型：</td>
            <td class="pb20 ">
                <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                    <span class="fl select_shelter">
                        <select name="info[type]" class="fl fontc_666" id='type'>
                            <?php
                            $tabletype = Import::_gettabletype();
                            foreach ($tabletype as $k => $v):
                                ?>
                                <option value="<?php echo $k; ?>"><?php echo $v; ?></option>
                            <?php endforeach; ?>
                        </select>
                    </span>
                </span>
            </td>
        </tr>
        <tr height="55">
            <td  valign="top"align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>字段长度：</td>
            <td valign="top" class="formValidator_td">
                <input type="text" value="" name="info[length]" id='length'  class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                <div class="formValidator_tip">
                    <p id="lengthTip" ></p>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right" class="pr5">小数位：</td>
            <td><input type="text" value="" name="info[float]"  class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" /></td>
        </tr>
        <tr>
            <td align="right" class="pt20 pr5">对应栏位：</td>
            <td class="pt20">
                <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                    <span class="fl select_shelter">
                        <select name="info[row]" class="fl fontc_666" onchange="checkrow(this.value)">
						<option value="exam_id">考试项目</option>
						<option value="student_id">学生ID</option>
						<option value="student_name">姓名</option>
						<option value="exam_code">准考号</option>
						<option value="roll">学籍号</option>
						<option value="city_code">城市代码</option>
						<option value="city_name">城市简称</option>
						<option value="school_code">学校代码</option>
						<option value="school_name">学校名称</option>
						<option value="class_name">班级代码</option>
						<option value="student_sex">学生性别</option>
						<option value="school_id">学校id</option>
						<option value="nature">学校性质</option>
						<option value="interstellar">学校星级</option>
						<option value="socre">中考成绩</option>
						<option value="disciplin_code">科别代码</option>
						<option value="disciplin_name">科别名称</option>
						<option value="disciplin_type">科别类型</option>
						<option value="ywkgf">语文客观分</option>
						<option value="ywzgf">语文主观分</option>
						<option value="ywzwf">语文作文分</option>
						<option value="ywfjf">语文附加分</option>
						<option value="ywf">语文总分</option>
						<option value="sxtkf">数学填空</option>
						<option value="sxjdf">数学解答</option>
						<option value="sxfjf">数学附加</option>
						<option value="sxf">数学总分</option>
						<option value="yykgf">英语客观分</option>
						<option value="yyzgf">英语主观分</option>
						<option value="yyzwf">英语作文分</option>
						<option value="yyf">英语总分</option>
						<option value="yswzf">语数外总分</option>
						<option value="yswzfhfjf">语数外总分（含附加分）</option>
						<option value="wlkgf">物理客观分</option>
						<option value="wlzgf">物理主观分</option>
						<option value="wlf">物理总分</option>
						<option value="hxkgf">化学客观分</option>
						<option value="hxzgf">化学主观分</option>
						<option value="hxf">化学总分</option>
						<option value="swkgf">生物客观分</option>
						<option value="swzgf">生物主观分</option>
						<option value="swf">生物总分</option>
						<option value="lskgf">历史客观分</option>
						<option value="lszgf">历史主观分</option>
						<option value="lsf">历史总分 </option>
						<option value="zzkgf">政治客观分</option>
						<option value="zzzgf">政治主观分</option>
						<option value="zzf">政治总分</option>
						<option value="dlkgf">地理客观分</option>
						<option value="dlzgf">地理主观分</option>
						<option value="dlf">地理总分</option>
						<option value="ramark">备注</option>
						<option value="track">跟踪号</option>
						<option value="default_statis">是否统计分数</option>
						<option value="statis">是否统计</option>
						<option value="addtime">添加时间</option>
						<option value="uptime">更新时间</option>
						<option value="gdz">固定值</option>
                            <!-- <?php
                            $tableinfo = Import::_gettableinfo('student');
                            foreach ($tableinfo as $k => $v):
                                ?>
                                <option value="<?php echo $v['COLUMN_NAME']; ?>"><?php echo $v['COMMENTS']; ?></option>
                            <?php endforeach; ?>
                            <option value="gdz">固定值</option> -->
                        </select>
                    </span>
                </span>
            </td>
        </tr>
        <tr id="gdz" style="display:none;">
            <td align="right" class="pt20 pr5">固定值：</td>
            <td class="pt20"><input type="text" value="" name="info[value]"  class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" /></td>
        </tr>
        <tr>
            <td align="right" class="pt10 pr5">是否生效：</td>
            <td class="pt10"><input type="checkbox" name="info[status]" value='1' checked /></td>
        </tr>
        <tr>
            <td align="right" class="pt10 pr5 pb20"></td>
            <td class="pt10 pb20">
                <input type="submit" value="保存" name="submit" class="b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 cursor mr10" />
                <input type="button" value="取消"  onclick="api.close()" class="b_a_n border_3 back_bgb w80 height32 fontc_FFF fonts_12 cursor" />
            </td>
        </tr>
        </tbody>
    </table>
    <?php
    $this->endWidget();
    ?>
</div>
<iframe src='' style="display:none" name='ajax-frame'></iframe>
<script>
$(function() {
	$.formValidator.initConfig({formID: "searchForm", theme: "126", submitOnce: false,
	onError: function(msg, obj, errorlist) {
		$("#errorlist").empty();
		$.map(errorlist, function(msg) {
			$("#errorlist").append("<li>" + msg + "</li>")
		});
		alert(msg);
	},
	ajaxPrompt: '有数据正在异步验证，请稍等...'
	});


	/*排序号验证*/
	$("#number").formValidator({
		onShowText: "请输入排序号",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:3,
		onError: "请输入排序号长度最少一位"
	}).regexValidator({
		regExp: "intege1",
		dataType: "enum",
		onError: "排序号位数必须是正整数"
	});

	/*字段名称验证*/
	$("#name").formValidator({
		onShowText: "请输入字段名称",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:20,
		onError: "字段名称长度 在1-20之间(1-10个汉字)"
	});
	/*字段长度验证*/
	$("#length").formValidator({
		onShowText: "请输入字段长度",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:10,
		onError: "字段长度在1-10之间"
	});

})
function checkrow(val){
	if(val=='gdz'){
		$("#gdz").show();
	}else{
		$("#gdz").hide();
	}
}
</script>
<?php exit; ?>